import request from '@/utils/request'

// 查询垃圾类型列表
export function listRubbishType (query) {
  return request({
    url: '/building/rubbishType/list',
    method: 'get',
    params: query
  })
}

// 查询垃圾类型树
export function treeRubbishType (query) {
  return request({
    url: '/building/rubbishType/tree',
    method: 'get',
    params: query
  })
}

// 查询建筑物类型列表（排除节点）
export function listRubbishTypeExcludeChild (deptId) {
  return request({
    url: '/building/rubbishType/list/exclude/' + deptId,
    method: 'get'
  })
}


// 查询垃圾类型详细
export function getRubbishType (id) {
  return request({
    url: '/building/rubbishType/' + id,
    method: 'get'
  })
}

// 新增垃圾类型
export function addRubbishType (data) {
  return request({
    url: '/building/rubbishType',
    method: 'post',
    data: data
  })
}

// 修改垃圾类型
export function updateRubbishType (data) {
  return request({
    url: '/building/rubbishType',
    method: 'put',
    data: data
  })
}

// 删除垃圾类型
export function delRubbishType (id) {
  return request({
    url: '/building/rubbishType/' + id,
    method: 'delete'
  })
}
